@base-width: 1920;
@base-height: 1080;
@base-n: 100;

@fatal-color: rgba(210, 0, 0, 1);
@high-color: rgba(255, 88, 100, 1);

.leaf-map-content {
  width: 100% !important;
  height: 100% !important;
  background: #222739 !important;

  .pylogn-label {
    font-size: 12px;
    color: #39476a;
    white-space: nowrap;
    // &.active{
    //   color: #ffffff;
    // }
    .label-wrapper {
      display: inline-block;
      transform: scale(0.7);
      transition: all 0.1s;

      &.hidden {
        opacity: 0;
      }
    }
  }

  .leaflet-control-container {
    .leaflet-top.leaflet-right {
      right: 10%;
      top: 25%;
    }
    .leaflet-control-attribution {
      display: none;
    }
    .leaflet-control-zoom,
    .map-reset-control {
      margin: 0;
      box-shadow: none;
      user-select: none;

      .leaflet-control-zoom-in,
      .leaflet-control-zoom-out,
      .reset {
        width: 1rem * (@base-n * 32 / @base-height) !important;
        height: 1rem * (@base-n * 32 / @base-height) !important;
        line-height: 1rem * (@base-n * 32 / @base-height) !important;
        font-size: 1rem * (@base-n * 15 / @base-height);
        color: #ffffff;
        border: 1px solid #ffffff;
        border-radius: 0;
        margin-bottom: 1rem * (@base-n * 8 / @base-height);
        background: transparent;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
      }
    }
  }

  .leaflet-popup {
    margin-bottom: 1rem * (@base-n * 80 / @base-height);
    user-select: none;
    &::after {
      content: '.';
      position: absolute;
      left: 50%;
      overflow: hidden;
      height: 1rem * (@base-n * 80 / @base-height);
      width: 1px;
      background-color: #00d9ff;
      overflow: hidden;
    }

    .leaflet-popup-content-wrapper {
      position: relative;
      background: rgba(41, 50, 71, 0.2);
      border: 1px solid rgba(0, 214, 255, 1);
      box-shadow: 0px 4px 2px 0px rgba(0, 240, 255, 0.3) inset,
        0px 5px 10px 0px rgba(0, 240, 255, 0.3) inset, 0px 3px 62px 0px rgba(0, 240, 255, 0.3) inset;
      border-radius: 4px;
      color: rgba(255, 255, 255, 1);
      font-size: 1rem * (@base-n * 14 / @base-height);
      padding-top: 1rem * (@base-n * 32 / @base-height);
      padding-right: 1rem * (@base-n * 22 / @base-height);
      padding-bottom: 1rem * (@base-n * 22 / @base-height);
      padding-left: 1rem * (@base-n * 22 / @base-height);
      transition: all 0.32s;

      .leaflet-popup-content {
        margin: 0;
        padding: 0;
      }

      .title {
        display: flex;
        align-items: center;
        position: absolute;
        top: 0;
        left: 50%;
        font-size: 1rem * (@base-n * 14 / @base-height);
        padding: 1rem * (@base-n * 8 / @base-height);
        background: rgba(29, 100, 127, 1);
        border: 1px solid rgba(0, 214, 255, 1);
        border-radius: 4px;
        transform: translate(-50%, -50%);
        white-space: nowrap;
        img {
          height: 1rem * (@base-n * 20 / @base-height);
          margin-right: 1rem * (@base-n * 6 / @base-height);
        }
      }

      .item {
        line-height: 2;
      }
    }
    .leaflet-popup-tip-container {
      display: none;
    }

    &.safe {
      &::after {
        background-color: rgba(0, 214, 255, 0.8);
      }
      .leaflet-popup-content-wrapper {
        background: rgba(41, 50, 71, 0.8);
        box-shadow: 0px 4px 2px 0px rgba(0, 240, 255, 0.3) inset,
          0px 5px 10px 0px rgba(0, 240, 255, 0.3) inset,
          0px 3px 62px 0px rgba(0, 240, 255, 0.3) inset;
      }
      .title {
        border: 1px solid rgba(0, 214, 255, 0.8);
      }
    }
    &.low {
      &::after {
        background-color: rgba(233, 218, 38, 0.8);
      }
      .leaflet-popup-content-wrapper {
        background: rgba(41, 50, 71, 0.8);
        border: 1px solid rgba(233, 218, 38, 0.8);
        box-shadow: 0px 5px 10px 0px rgba(97, 91, 14, 0.74) inset,
          0px 3px 62px 0px rgba(90, 84, 18, 0.74) inset;
      }
      .title {
        background: rgba(79, 76, 28, 0.8);
        border: 1px solid rgba(233, 218, 38, 0.8);
      }
    }
    &.middle {
      &::after {
        background-color: rgba(255, 109, 0, 0.8);
      }
      .leaflet-popup-content-wrapper {
        background: rgba(41, 50, 71, 0.8);
        border: 1px solid rgba(255, 109, 0, 0.8);
        box-shadow: 0px 5px 10px 0px rgba(255, 109, 0, 0.74) inset,
          0px 3px 62px 0px rgba(115, 52, 5, 0.74) inset;
      }
      .title {
        background: rgba(97, 46, 24, 0.8);
        border: 1px solid rgba(255, 109, 0, 0.8);
      }
    }
    &.high {
      &::after {
        background-color: rgba(255, 88, 100, 0.8);
      }
      .leaflet-popup-content-wrapper {
        background: rgba(41, 50, 71, 0.8);
        border: 1px solid rgba(255, 88, 100, 0.8);
        box-shadow: 0px 5px 10px 0px rgba(160, 44, 52, 0.74) inset,
          0px 3px 62px 0px rgba(255, 88, 100, 0.74) inset;
      }
      .title {
        background: rgba(77, 42, 55, 0.8);
        border: 1px solid rgba(255, 88, 100, 0.8);
      }
    }
    &.fatal {
      &::after {
        background-color: rgba(210, 0, 0, 0.8);
      }
      .leaflet-popup-content-wrapper {
        background: rgba(41, 50, 71, 0.8);
        border: 1px solid rgba(210, 0, 0, 0.8);
        box-shadow: 0px 5px 10px 0px rgba(160, 44, 52, 0.74) inset,
          0px 3px 62px 0px rgba(255, 88, 100, 0.74) inset;
      }
      .title {
        background: rgba(70, 42, 51, 0.8);
        border: 1px solid rgba(230, 0, 0, 0.8);
      }
    }
  }
  .map-marker-icon,
  .map-marker-icon img {
    width: 100%;
    height: 100%;
  }
  .map-marker-icon {
    position: relative;
    line-height: 0;
    border-radius: 50%;
  }
  .map-marker.active {
    &.safe {
      background-image: radial-gradient(circle at center, rgba(0, 241, 255, 0.8), transparent);
      .map-marker-icon {
        box-shadow: 0 0 15px rgba(0, 241, 255, 0.8);
      }
    }
    &.low {
      background-image: radial-gradient(circle at center, rgba(233, 218, 38, 1), transparent);
      .map-marker-icon {
        box-shadow: 0 0 15px rgba(233, 218, 38, 1);
      }
    }
    &.middle {
      background-image: radial-gradient(circle at center, rgba(255, 109, 0, 1), transparent);
      .map-marker-icon {
        box-shadow: 0 0 15px rgba(255, 109, 0, 1);
      }
    }
    &.high {
      background-image: radial-gradient(circle at center, rgba(255, 88, 100, 1), transparent);
      .map-marker-icon {
        box-shadow: 0 0 15px rgba(255, 88, 100, 1);
      }
    }
    &.fatal {
      background-image: radial-gradient(circle at center, rgba(210, 0, 0, 1), transparent);
      .map-marker-icon {
        box-shadow: 0 0 15px rgba(210, 0, 0, 1);
      }
    }
  }
}
